package com.itlv.recursion.business.controller;

import com.itlv.recursion.business.domain.Menu;
import com.itlv.recursion.business.service.MenuService;
import com.itlv.recursion.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 菜单 前端控制层
 *
 * @author Lv
 * @date 2022/10/22
 */
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;

    /**
     * 加载树状结构菜单列表
     *
     * @return
     */
    @GetMapping("/list_menu_tree")
    public Result<List<Menu>> listMenuTree() {
        return menuService.listMenuTree();
    }
}
